<?php

App::uses('AppModel', 'Model');

class TransactionItem extends AppModel {

    public $name = 'TransactionItem';

    public $hasOne = array(
        'StudentSrcDue' => array(
            'className' => 'StudentSrcDue',
            'foreignKey' => 'transaction_item_id',
            'conditions' => '',
            'fields' => '',
            'order' => ''
        )
    );

    public $belongsTo = array(
        'Fee' => array(
            'className' => 'Fee',
            'foreignKey' => 'fee_id',
            'conditions' => '',
            'fields' => '',
            'order' => ''
        ),
        'Transaction' => array(
            'className' => 'Transaction',
            'foreignKey' => 'transaction_id',
            'conditions' => '',
            'fields' => '',
            'order' => ''
        )
    );

    public function save($data = null,$validate = true, $fieldList = array()) {
        $s = $this->sanitize($data);
        return parent::save($s);
    }

}